package net.qiqbframework.modelling.command.fetching;


import net.qiqbframework.modelling.command.BizIdentifierVoucherMember;
import net.qiqbframework.modelling.domain.Aggregate;

import java.util.List;
import java.util.Optional;

public interface Command<C, A> {

    C commandObject();

    AggregateCommandModel<C, A> commandModel();

    /**
     * 获取聚合对象
     *
     * @return
     */
    Optional<Aggregate<A>> obtainAggregate();

    List<BizIdentifierVoucherMember> allBizIdentifierVoucherMembers();
}
